//
//  WmcDeviceManager.swift
//  YPWatermarkCamera
//
//  Created by Json on 2023/8/15.
//

import UIKit
import KeychainAccess

class WmcDeviceManager: NSObject {
    
    static var uuid: String = {
        let key = "uuid"
        guard let info = Bundle.main.infoDictionary else { return "" }
        guard let identifier = info["CFBundleIdentifier"] as? String else { return "" }
        let keychain = Keychain(service: identifier)
        guard let uuid = keychain[key] else {
            let uuid: String? = UIDevice.current.identifierForVendor?.uuidString
            keychain[key] = uuid
            return uuid ?? "无UUID"
        }
        return uuid
    }()

}
